Rows: 206 Columns: 1112
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): iso3, country, hdicode, region
dbl (1108): hdi_rank_2023, hdi_1990, hdi_1991, hdi_1992, hdi_1993, hdi_1994,...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Reading layer `World_Countries_Generalized' from data source
`D:\CASA\CASA0005\Week4\Data\World_Countries_(Generalized)_-573431906301700955\World_Countries_Generalized.shp'
using driver `ESRI Shapefile'
Simple feature collection with 251 features and 4 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -20037510 ymin: -30240970 xmax: 20037510 ymax: 18418390
Projected CRS: WGS 84 / Pseudo-Mercator
head(shp)
Simple feature collection with 6 features and 4 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -19015950 ymin: -2039467 xmax: 8339582 ymax: 5260415
Projected CRS: WGS 84 / Pseudo-Mercator
country iso countryaff aff_iso geometry
1 Afghanistan AF Afghanistan AF MULTIPOLYGON (((6821275 424...
2 Albania AL Albania AL MULTIPOLYGON (((2178615 511...
3 Algeria DZ Algeria DZ MULTIPOLYGON (((512443 4423...
4 American Samoa AS United States US MULTIPOLYGON (((-19007124 -...
5 Andorra AD Andorra AD MULTIPOLYGON (((160949.7 52...
6 Angola AO Angola AO MULTIPOLYGON (((2613349 -19...
ℹ tmap modes "plot" - "view"
ℹ toggle with `tmap::ttm()`
tm_shape(joint_data)+tm_polygons(fill ="diff_10_19",fill.scale =tm_scale_intervals(values="-brewer.RdYlBu",style="jenks"),fill_alpha=0.4,fill.legend =tm_legend(title ="the index of inequality", size =0.6))+tm_basemap(server ="OpenStreetMap") +tm_compass(type ="arrow", position =c("left", "bottom")) +tm_scalebar(position =c("left", "bottom"))+tm_title("The changes of inenquality index from 2010 to 2019", size =2,position =c("center", "top"))
[scale] tm_polygons:() the data variable assigned to 'fill' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals(<HERE>)' to use all visual values (e.g. colors)
[cols4all] color palettes: use palettes from the R package cols4all. Run
`cols4all::c4a_gui()` to explore them. The old palette name "-brewer.RdYlBu" is
named "rd_yl_bu" (in long format "brewer.rd_yl_bu")